<script src="/static/js/plugins/echarts/echarts.common.min.js"></script>
         <div id="main" style="width: 900px;height:400px;"></div>
                <script type="text/javascript">
                    var myChart =echarts.init(document.getElementById('main'));
                    var option = {
                        tooltip: {
                            trigger: 'axis',
                            axisPointer: {
                                type: 'cross',
                                crossStyle: {
                                    color: '#999'
                                }
                            }
                        },
                        toolbox: {
                            feature: {
                                dataView: {show: true, readOnly: false},
                                magicType: {show: true, type: ['line', 'bar']},
                                restore: {show: true},
                                saveAsImage: {show: true}
                            }
                        },
                        legend: {
                            data: ['总消费金额', '总优惠金额','总实收金额','订单数']
                        },
                        xAxis: [
                            {
                                type: 'category',
                                data: ${groupTypes},
                                axisPointer: {
                                    type: 'shadow'
                                }
                            }
                        ],
                        yAxis: [
                            {
                                type: 'value',
                                name: '金额',
                                min: 0,
                                max: 40000,
                                interval: 10000,
                                axisLabel: {
                                    formatter: '{value} ￥'
                                }
                            },
                            {
                                type: 'value',
                                name: '订单数量',
                                min: 0,
                                max: 4,
                                interval: 0.5,
                                axisLabel: {
                                    formatter: '{value} 个'
                                }
                            }
                        ],
                        series: [
                            {
                                name: '总消费金额',
                                type: 'bar',
                                data: ${totalAmounts}

                            },
                            {
                                name: '总优惠金额',
                                type: 'bar',
                                data: ${totalDiscountAmounts}
                            },
                            {
                                name: '总实收金额',
                                type: 'bar',

                                data: ${totalPayAmounts}
                            }  ,
                            {
                                name: '订单数',
                                type: 'line',
                                yAxisIndex: 1,
                                data: ${counts}
                            }
                        ]
                    };
                    myChart.setOption(option)
                </script>
